package com.example.demo;

import org.springframework.security.crypto.password.MessageDigestPasswordEncoder;

/**
 * @Auther: tianchao
 * @Date: 2022/4/11 15:40
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        MessageDigestPasswordEncoder messageDigestPasswordEncoder = new MessageDigestPasswordEncoder("MD5");
        String tianchao = messageDigestPasswordEncoder.encode("tianchao");
        System.out.println(tianchao);
        tianchao = messageDigestPasswordEncoder.encode("tianchao");
        System.out.println(tianchao);
    }
}
